import '../hj_model/splash/domain_source_model.dart';

///地址数据
// ignore_for_file: constant_identifier_names

class Address {
  static String? shareUrlNew;

  static const API_PREFIX = 'api/app';

  static const H5_SUFFIX = 'h5/app';

  /// 基本的path
  static String? baseHost;

  /// 基本的path
  static String? baseApiPath;

  ///cdn地址，后台返回
  static String? cdnAddress;

  /// 有声小说 cdn
  static String? audioCdnAddress;

  ///图片加载地址
  static String? baseImagePath;

  ///官网地址
  static String? baseGroupUrl;
  static String? groupTelegram;

  ///落地页地址
  static String? groundURl;

  /// 福利广场应用中心链接
  static String? appCenterUrl;

  ///通过支付宝API解析银行卡号发卡行和银行卡类别、获取银行LOGO
  static const ALI_CCD_API = 'https://ccdcapi.alipay.com/validateAndCacheCardInfo.json?_input_charset=utf-8&cardBinCheck=true&cardNo=';

  static List<Domain> cdnAddressLists = [];

  static Domain? get currentDomain {
    if (cdnAddressLists.isEmpty) return null;
    int index = cdnAddressLists.indexWhere((element) => element.url == cdnAddress);
    if (index < 0) return null;
    return cdnAddressLists[cdnAddressLists.indexWhere((element) => element.url == cdnAddress)];
  }

  ///视频上传
  static const UPLOAD_VIDEO = '/vid/uploadDotJson';
  //图片上传
  static const UPLOAD_IMG = '/vid/uploadStatic';

  static String? token;
}
